﻿<!DOCTYPE html><html><head>
    <meta charset="utf-8">
    <link href="./Command reference – Redis_html/11452400.css" rel="stylesheet" type="text/css">
    <link href="./Command reference – Redis_html/6234978.png" rel="shortcut icon">
    <link href="./Command reference – Redis_html/8018736.xml" rel="search" title="Look up a Redis command" type="application/opensearchdescription+xml">
    <script type="text/javascript" async="" src="./Command reference – Redis_html/11786579.js"></script><script src="./Command reference – Redis_html/13004955.min.js"></script>
    <script async="async" defer="defer" src="./Command reference – Redis_html/2955288.js"></script>
    <meta content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
    <title>
      Command reference – Redis
    </title>
    <script type="text/javascript">
      //<![CDATA[
         var _gaq = _gaq || [];
         _gaq.push(['_setAccount', 'UA-20243082-1']);
         _gaq.push(['_trackPageview']);
        
         (function() {
           var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
           ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
           var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
         })();
      //]]>
    </script>
  </head>
  <body class="">
    <header>
      <div class="container">
        <a href="http://redis.io/">
          <img alt="Redis" height="30" src="./Command reference – Redis_html/11543410.png" width="93">
        </a>
        <nav>
          <a href="http://redis.io/commands">Commands</a>
          <a href="http://redis.io/clients">Clients</a>
          <a href="http://redis.io/documentation">Documentation</a>
          <a href="http://redis.io/community">Community</a>
          <a href="http://redis.io/download">Download</a>
          <a href="https://github.com/antirez/redis/issues">Issues</a>
          <a href="http://redis.io/support">Support</a>
          <a href="http://redis.io/topics/license">License</a>
        </nav>
      </div>
    </header>
    <section id="commands">
      <nav>
        <a href="http://redis.io/commands/#" class="current">All</a>
        <a href="http://redis.io/commands/#generic">Keys</a>
        <a href="http://redis.io/commands/#string">Strings</a>
        <a href="http://redis.io/commands/#hash">Hashes</a>
        <a href="http://redis.io/commands/#list">Lists</a>
        <a href="http://redis.io/commands/#set">Sets</a>
        <a href="http://redis.io/commands/#sorted_set">Sorted Sets</a>
        <a href="http://redis.io/commands/#pubsub">Pub/Sub</a>
        <a href="http://redis.io/commands/#transactions">Transactions</a>
        <a href="http://redis.io/commands/#scripting">Scripting</a>
        <a href="http://redis.io/commands/#connection">Connection</a>
        <a href="http://redis.io/commands/#server">Server</a>
      </nav>
      <ul style="height: 11109px; ">
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/append">APPEND</a>
            <span class="args">
              key
              value
            </span>
          </span>
          <span class="summary">Append a value to a key</span>
        </li>
        <li data-group="connection">
          <span class="command">
            <a href="http://redis.io/commands/auth">AUTH</a>
            <span class="args">
              password
            </span>
          </span>
          <span class="summary">Authenticate to the server</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/bgrewriteaof">BGREWRITEAOF</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Asynchronously rewrite the append-only file</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/bgsave">BGSAVE</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Asynchronously save the dataset to disk</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/bitcount">BITCOUNT</a>
            <span class="args">
              key
              [start]
              [end]
            </span>
          </span>
          <span class="summary">Count set bits in a string</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/bitop">BITOP</a>
            <span class="args">
              operation
              destkey
              key [key ...]
            </span>
          </span>
          <span class="summary">Perform bitwise operations between strings</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/blpop">BLPOP</a>
            <span class="args">
              key [key ...]
              timeout
            </span>
          </span>
          <span class="summary">Remove and get the first element in a list, or block until one is available</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/brpop">BRPOP</a>
            <span class="args">
              key [key ...]
              timeout
            </span>
          </span>
          <span class="summary">Remove and get the last element in a list, or block until one is available</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/brpoplpush">BRPOPLPUSH</a>
            <span class="args">
              source
              destination
              timeout
            </span>
          </span>
          <span class="summary">Pop a value from a list, push it to another list and return it; or block until one is available</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/client-kill">CLIENT KILL</a>
            <span class="args">
              ip:port
            </span>
          </span>
          <span class="summary">Kill the connection of a client</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/client-list">CLIENT LIST</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Get the list of client connections</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/client-getname">CLIENT GETNAME</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Get the current connection name</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/client-pause">CLIENT PAUSE</a>
            <span class="args">
              timeout
            </span>
          </span>
          <span class="summary">Stop processing commands from clients for some time</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/client-setname">CLIENT SETNAME</a>
            <span class="args">
              connection-name
            </span>
          </span>
          <span class="summary">Set the current connection name</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/config-get">CONFIG GET</a>
            <span class="args">
              parameter
            </span>
          </span>
          <span class="summary">Get the value of a configuration parameter</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/config-rewrite">CONFIG REWRITE</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Rewrite the configuration file with the in memory configuration</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/config-set">CONFIG SET</a>
            <span class="args">
              parameter
              value
            </span>
          </span>
          <span class="summary">Set a configuration parameter to the given value</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/config-resetstat">CONFIG RESETSTAT</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Reset the stats returned by INFO</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/dbsize">DBSIZE</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Return the number of keys in the selected database</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/debug-object">DEBUG OBJECT</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get debugging information about a key</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/debug-segfault">DEBUG SEGFAULT</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Make the server crash</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/decr">DECR</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Decrement the integer value of a key by one</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/decrby">DECRBY</a>
            <span class="args">
              key
              decrement
            </span>
          </span>
          <span class="summary">Decrement the integer value of a key by the given number</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/del">DEL</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Delete a key</span>
        </li>
        <li data-group="transactions">
          <span class="command">
            <a href="http://redis.io/commands/discard">DISCARD</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Discard all commands issued after MULTI</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/dump">DUMP</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Return a serialized version of the value stored at the specified key.</span>
        </li>
        <li data-group="connection">
          <span class="command">
            <a href="http://redis.io/commands/echo">ECHO</a>
            <span class="args">
              message
            </span>
          </span>
          <span class="summary">Echo the given string</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/eval">EVAL</a>
            <span class="args">
              script
              numkeys
              key [key ...]
              arg [arg ...]
            </span>
          </span>
          <span class="summary">Execute a Lua script server side</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/evalsha">EVALSHA</a>
            <span class="args">
              sha1
              numkeys
              key [key ...]
              arg [arg ...]
            </span>
          </span>
          <span class="summary">Execute a Lua script server side</span>
        </li>
        <li data-group="transactions">
          <span class="command">
            <a href="http://redis.io/commands/exec">EXEC</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Execute all commands issued after MULTI</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/exists">EXISTS</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Determine if a key exists</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/expire">EXPIRE</a>
            <span class="args">
              key
              seconds
            </span>
          </span>
          <span class="summary">Set a key's time to live in seconds</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/expireat">EXPIREAT</a>
            <span class="args">
              key
              timestamp
            </span>
          </span>
          <span class="summary">Set the expiration for a key as a UNIX timestamp</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/flushall">FLUSHALL</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Remove all keys from all databases</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/flushdb">FLUSHDB</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Remove all keys from the current database</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/get">GET</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the value of a key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/getbit">GETBIT</a>
            <span class="args">
              key
              offset
            </span>
          </span>
          <span class="summary">Returns the bit value at offset in the string value stored at key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/getrange">GETRANGE</a>
            <span class="args">
              key
              start
              end
            </span>
          </span>
          <span class="summary">Get a substring of the string stored at a key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/getset">GETSET</a>
            <span class="args">
              key
              value
            </span>
          </span>
          <span class="summary">Set the string value of a key and return its old value</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hdel">HDEL</a>
            <span class="args">
              key
              field [field ...]
            </span>
          </span>
          <span class="summary">Delete one or more hash fields</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hexists">HEXISTS</a>
            <span class="args">
              key
              field
            </span>
          </span>
          <span class="summary">Determine if a hash field exists</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hget">HGET</a>
            <span class="args">
              key
              field
            </span>
          </span>
          <span class="summary">Get the value of a hash field</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hgetall">HGETALL</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get all the fields and values in a hash</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hincrby">HINCRBY</a>
            <span class="args">
              key
              field
              increment
            </span>
          </span>
          <span class="summary">Increment the integer value of a hash field by the given number</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hincrbyfloat">HINCRBYFLOAT</a>
            <span class="args">
              key
              field
              increment
            </span>
          </span>
          <span class="summary">Increment the float value of a hash field by the given amount</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hkeys">HKEYS</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get all the fields in a hash</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hlen">HLEN</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the number of fields in a hash</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hmget">HMGET</a>
            <span class="args">
              key
              field [field ...]
            </span>
          </span>
          <span class="summary">Get the values of all the given hash fields</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hmset">HMSET</a>
            <span class="args">
              key
              field value [field value ...]
            </span>
          </span>
          <span class="summary">Set multiple hash fields to multiple values</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hset">HSET</a>
            <span class="args">
              key
              field
              value
            </span>
          </span>
          <span class="summary">Set the string value of a hash field</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hsetnx">HSETNX</a>
            <span class="args">
              key
              field
              value
            </span>
          </span>
          <span class="summary">Set the value of a hash field, only if the field does not exist</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hvals">HVALS</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get all the values in a hash</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/incr">INCR</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Increment the integer value of a key by one</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/incrby">INCRBY</a>
            <span class="args">
              key
              increment
            </span>
          </span>
          <span class="summary">Increment the integer value of a key by the given amount</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/incrbyfloat">INCRBYFLOAT</a>
            <span class="args">
              key
              increment
            </span>
          </span>
          <span class="summary">Increment the float value of a key by the given amount</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/info">INFO</a>
            <span class="args">
              [section]
            </span>
          </span>
          <span class="summary">Get information and statistics about the server</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/keys">KEYS</a>
            <span class="args">
              pattern
            </span>
          </span>
          <span class="summary">Find all keys matching the given pattern</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/lastsave">LASTSAVE</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Get the UNIX time stamp of the last successful save to disk</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lindex">LINDEX</a>
            <span class="args">
              key
              index
            </span>
          </span>
          <span class="summary">Get an element from a list by its index</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/linsert">LINSERT</a>
            <span class="args">
              key
              BEFORE|AFTER
              pivot
              value
            </span>
          </span>
          <span class="summary">Insert an element before or after another element in a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/llen">LLEN</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the length of a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lpop">LPOP</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Remove and get the first element in a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lpush">LPUSH</a>
            <span class="args">
              key
              value [value ...]
            </span>
          </span>
          <span class="summary">Prepend one or multiple values to a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lpushx">LPUSHX</a>
            <span class="args">
              key
              value
            </span>
          </span>
          <span class="summary">Prepend a value to a list, only if the list exists</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lrange">LRANGE</a>
            <span class="args">
              key
              start
              stop
            </span>
          </span>
          <span class="summary">Get a range of elements from a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lrem">LREM</a>
            <span class="args">
              key
              count
              value
            </span>
          </span>
          <span class="summary">Remove elements from a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/lset">LSET</a>
            <span class="args">
              key
              index
              value
            </span>
          </span>
          <span class="summary">Set the value of an element in a list by its index</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/ltrim">LTRIM</a>
            <span class="args">
              key
              start
              stop
            </span>
          </span>
          <span class="summary">Trim a list to the specified range</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/mget">MGET</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Get the values of all the given keys</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/migrate">MIGRATE</a>
            <span class="args">
              host
              port
              key
              destination-db
              timeout
              [COPY]
              [REPLACE]
            </span>
          </span>
          <span class="summary">Atomically transfer a key from a Redis instance to another one.</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/monitor">MONITOR</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Listen for all requests received by the server in real time</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/move">MOVE</a>
            <span class="args">
              key
              db
            </span>
          </span>
          <span class="summary">Move a key to another database</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/mset">MSET</a>
            <span class="args">
              key value [key value ...]
            </span>
          </span>
          <span class="summary">Set multiple keys to multiple values</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/msetnx">MSETNX</a>
            <span class="args">
              key value [key value ...]
            </span>
          </span>
          <span class="summary">Set multiple keys to multiple values, only if none of the keys exist</span>
        </li>
        <li data-group="transactions">
          <span class="command">
            <a href="http://redis.io/commands/multi">MULTI</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Mark the start of a transaction block</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/object">OBJECT</a>
            <span class="args">
              subcommand
              [arguments [arguments ...]]
            </span>
          </span>
          <span class="summary">Inspect the internals of Redis objects</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/persist">PERSIST</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Remove the expiration from a key</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/pexpire">PEXPIRE</a>
            <span class="args">
              key
              milliseconds
            </span>
          </span>
          <span class="summary">Set a key's time to live in milliseconds</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/pexpireat">PEXPIREAT</a>
            <span class="args">
              key
              milliseconds-timestamp
            </span>
          </span>
          <span class="summary">Set the expiration for a key as a UNIX timestamp specified in milliseconds</span>
        </li>
        <li data-group="connection">
          <span class="command">
            <a href="http://redis.io/commands/ping">PING</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Ping the server</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/psetex">PSETEX</a>
            <span class="args">
              key
              milliseconds
              value
            </span>
          </span>
          <span class="summary">Set the value and expiration in milliseconds of a key</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/psubscribe">PSUBSCRIBE</a>
            <span class="args">
              pattern [pattern ...]
            </span>
          </span>
          <span class="summary">Listen for messages published to channels matching the given patterns</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/pubsub">PUBSUB</a>
            <span class="args">
              subcommand
              [argument [argument ...]]
            </span>
          </span>
          <span class="summary">Inspect the state of the Pub/Sub subsystem</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/pttl">PTTL</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the time to live for a key in milliseconds</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/publish">PUBLISH</a>
            <span class="args">
              channel
              message
            </span>
          </span>
          <span class="summary">Post a message to a channel</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/punsubscribe">PUNSUBSCRIBE</a>
            <span class="args">
              [pattern [pattern ...]]
            </span>
          </span>
          <span class="summary">Stop listening for messages posted to channels matching the given patterns</span>
        </li>
        <li data-group="connection">
          <span class="command">
            <a href="http://redis.io/commands/quit">QUIT</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Close the connection</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/randomkey">RANDOMKEY</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Return a random key from the keyspace</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/rename">RENAME</a>
            <span class="args">
              key
              newkey
            </span>
          </span>
          <span class="summary">Rename a key</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/renamenx">RENAMENX</a>
            <span class="args">
              key
              newkey
            </span>
          </span>
          <span class="summary">Rename a key, only if the new key does not exist</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/restore">RESTORE</a>
            <span class="args">
              key
              ttl
              serialized-value
            </span>
          </span>
          <span class="summary">Create a key using the provided serialized value, previously obtained using DUMP.</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/rpop">RPOP</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Remove and get the last element in a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/rpoplpush">RPOPLPUSH</a>
            <span class="args">
              source
              destination
            </span>
          </span>
          <span class="summary">Remove the last element in a list, append it to another list and return it</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/rpush">RPUSH</a>
            <span class="args">
              key
              value [value ...]
            </span>
          </span>
          <span class="summary">Append one or multiple values to a list</span>
        </li>
        <li data-group="list">
          <span class="command">
            <a href="http://redis.io/commands/rpushx">RPUSHX</a>
            <span class="args">
              key
              value
            </span>
          </span>
          <span class="summary">Append a value to a list, only if the list exists</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sadd">SADD</a>
            <span class="args">
              key
              member [member ...]
            </span>
          </span>
          <span class="summary">Add one or more members to a set</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/save">SAVE</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Synchronously save the dataset to disk</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/scard">SCARD</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the number of members in a set</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/script-exists">SCRIPT EXISTS</a>
            <span class="args">
              script [script ...]
            </span>
          </span>
          <span class="summary">Check existence of scripts in the script cache.</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/script-flush">SCRIPT FLUSH</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Remove all the scripts from the script cache.</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/script-kill">SCRIPT KILL</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Kill the script currently in execution.</span>
        </li>
        <li data-group="scripting">
          <span class="command">
            <a href="http://redis.io/commands/script-load">SCRIPT LOAD</a>
            <span class="args">
              script
            </span>
          </span>
          <span class="summary">Load the specified Lua script into the script cache.</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sdiff">SDIFF</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Subtract multiple sets</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sdiffstore">SDIFFSTORE</a>
            <span class="args">
              destination
              key [key ...]
            </span>
          </span>
          <span class="summary">Subtract multiple sets and store the resulting set in a key</span>
        </li>
        <li data-group="connection">
          <span class="command">
            <a href="http://redis.io/commands/select">SELECT</a>
            <span class="args">
              index
            </span>
          </span>
          <span class="summary">Change the selected database for the current connection</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/set">SET</a>
            <span class="args">
              key
              value
              [EX seconds]
              [PX milliseconds]
              [NX|XX]
            </span>
          </span>
          <span class="summary">Set the string value of a key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/setbit">SETBIT</a>
            <span class="args">
              key
              offset
              value
            </span>
          </span>
          <span class="summary">Sets or clears the bit at offset in the string value stored at key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/setex">SETEX</a>
            <span class="args">
              key
              seconds
              value
            </span>
          </span>
          <span class="summary">Set the value and expiration of a key</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/setnx">SETNX</a>
            <span class="args">
              key
              value
            </span>
          </span>
          <span class="summary">Set the value of a key, only if the key does not exist</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/setrange">SETRANGE</a>
            <span class="args">
              key
              offset
              value
            </span>
          </span>
          <span class="summary">Overwrite part of a string at key starting at the specified offset</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/shutdown">SHUTDOWN</a>
            <span class="args">
              [NOSAVE]
              [SAVE]
            </span>
          </span>
          <span class="summary">Synchronously save the dataset to disk and then shut down the server</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sinter">SINTER</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Intersect multiple sets</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sinterstore">SINTERSTORE</a>
            <span class="args">
              destination
              key [key ...]
            </span>
          </span>
          <span class="summary">Intersect multiple sets and store the resulting set in a key</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sismember">SISMEMBER</a>
            <span class="args">
              key
              member
            </span>
          </span>
          <span class="summary">Determine if a given value is a member of a set</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/slaveof">SLAVEOF</a>
            <span class="args">
              host
              port
            </span>
          </span>
          <span class="summary">Make the server a slave of another instance, or promote it as master</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/slowlog">SLOWLOG</a>
            <span class="args">
              subcommand
              [argument]
            </span>
          </span>
          <span class="summary">Manages the Redis slow queries log</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/smembers">SMEMBERS</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get all the members in a set</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/smove">SMOVE</a>
            <span class="args">
              source
              destination
              member
            </span>
          </span>
          <span class="summary">Move a member from one set to another</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/sort">SORT</a>
            <span class="args">
              key
              [BY pattern]
              [LIMIT offset count]
              [GET pattern [GET pattern ...]]
              [ASC|DESC]
              [ALPHA]
              [STORE destination]
            </span>
          </span>
          <span class="summary">Sort the elements in a list, set or sorted set</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/spop">SPOP</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Remove and return a random member from a set</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/srandmember">SRANDMEMBER</a>
            <span class="args">
              key
              [count]
            </span>
          </span>
          <span class="summary">Get one or multiple random members from a set</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/srem">SREM</a>
            <span class="args">
              key
              member [member ...]
            </span>
          </span>
          <span class="summary">Remove one or more members from a set</span>
        </li>
        <li data-group="string">
          <span class="command">
            <a href="http://redis.io/commands/strlen">STRLEN</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the length of the value stored in a key</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/subscribe">SUBSCRIBE</a>
            <span class="args">
              channel [channel ...]
            </span>
          </span>
          <span class="summary">Listen for messages published to the given channels</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sunion">SUNION</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Add multiple sets</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sunionstore">SUNIONSTORE</a>
            <span class="args">
              destination
              key [key ...]
            </span>
          </span>
          <span class="summary">Add multiple sets and store the resulting set in a key</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/sync">SYNC</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Internal command used for replication</span>
        </li>
        <li data-group="server">
          <span class="command">
            <a href="http://redis.io/commands/time">TIME</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Return the current server time</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/ttl">TTL</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the time to live for a key</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/type">TYPE</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Determine the type stored at key</span>
        </li>
        <li data-group="pubsub">
          <span class="command">
            <a href="http://redis.io/commands/unsubscribe">UNSUBSCRIBE</a>
            <span class="args">
              [channel [channel ...]]
            </span>
          </span>
          <span class="summary">Stop listening for messages posted to the given channels</span>
        </li>
        <li data-group="transactions">
          <span class="command">
            <a href="http://redis.io/commands/unwatch">UNWATCH</a>
            <span class="args">
            </span>
          </span>
          <span class="summary">Forget about all watched keys</span>
        </li>
        <li data-group="transactions">
          <span class="command">
            <a href="http://redis.io/commands/watch">WATCH</a>
            <span class="args">
              key [key ...]
            </span>
          </span>
          <span class="summary">Watch the given keys to determine execution of the MULTI/EXEC block</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zadd">ZADD</a>
            <span class="args">
              key
              score member [score member ...]
            </span>
          </span>
          <span class="summary">Add one or more members to a sorted set, or update its score if it already exists</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zcard">ZCARD</a>
            <span class="args">
              key
            </span>
          </span>
          <span class="summary">Get the number of members in a sorted set</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zcount">ZCOUNT</a>
            <span class="args">
              key
              min
              max
            </span>
          </span>
          <span class="summary">Count the members in a sorted set with scores within the given values</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zincrby">ZINCRBY</a>
            <span class="args">
              key
              increment
              member
            </span>
          </span>
          <span class="summary">Increment the score of a member in a sorted set</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zinterstore">ZINTERSTORE</a>
            <span class="args">
              destination
              numkeys
              key [key ...]
              [WEIGHTS weight [weight ...]]
              [AGGREGATE SUM|MIN|MAX]
            </span>
          </span>
          <span class="summary">Intersect multiple sorted sets and store the resulting sorted set in a new key</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrange">ZRANGE</a>
            <span class="args">
              key
              start
              stop
              [WITHSCORES]
            </span>
          </span>
          <span class="summary">Return a range of members in a sorted set, by index</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrangebyscore">ZRANGEBYSCORE</a>
            <span class="args">
              key
              min
              max
              [WITHSCORES]
              [LIMIT offset count]
            </span>
          </span>
          <span class="summary">Return a range of members in a sorted set, by score</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrank">ZRANK</a>
            <span class="args">
              key
              member
            </span>
          </span>
          <span class="summary">Determine the index of a member in a sorted set</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrem">ZREM</a>
            <span class="args">
              key
              member [member ...]
            </span>
          </span>
          <span class="summary">Remove one or more members from a sorted set</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zremrangebyrank">ZREMRANGEBYRANK</a>
            <span class="args">
              key
              start
              stop
            </span>
          </span>
          <span class="summary">Remove all members in a sorted set within the given indexes</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zremrangebyscore">ZREMRANGEBYSCORE</a>
            <span class="args">
              key
              min
              max
            </span>
          </span>
          <span class="summary">Remove all members in a sorted set within the given scores</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrevrange">ZREVRANGE</a>
            <span class="args">
              key
              start
              stop
              [WITHSCORES]
            </span>
          </span>
          <span class="summary">Return a range of members in a sorted set, by index, with scores ordered from high to low</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrevrangebyscore">ZREVRANGEBYSCORE</a>
            <span class="args">
              key
              max
              min
              [WITHSCORES]
              [LIMIT offset count]
            </span>
          </span>
          <span class="summary">Return a range of members in a sorted set, by score, with scores ordered from high to low</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zrevrank">ZREVRANK</a>
            <span class="args">
              key
              member
            </span>
          </span>
          <span class="summary">Determine the index of a member in a sorted set, with scores ordered from high to low</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zscore">ZSCORE</a>
            <span class="args">
              key
              member
            </span>
          </span>
          <span class="summary">Get the score associated with the given member in a sorted set</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zunionstore">ZUNIONSTORE</a>
            <span class="args">
              destination
              numkeys
              key [key ...]
              [WEIGHTS weight [weight ...]]
              [AGGREGATE SUM|MIN|MAX]
            </span>
          </span>
          <span class="summary">Add multiple sorted sets and store the resulting sorted set in a new key</span>
        </li>
        <li data-group="generic">
          <span class="command">
            <a href="http://redis.io/commands/scan">SCAN</a>
            <span class="args">
              cursor
              [MATCH pattern]
              [COUNT count]
            </span>
          </span>
          <span class="summary">Incrementally iterate the keys space</span>
        </li>
        <li data-group="set">
          <span class="command">
            <a href="http://redis.io/commands/sscan">SSCAN</a>
            <span class="args">
              key
              cursor
              [MATCH pattern]
              [COUNT count]
            </span>
          </span>
          <span class="summary">Incrementally iterate Set elements</span>
        </li>
        <li data-group="hash">
          <span class="command">
            <a href="http://redis.io/commands/hscan">HSCAN</a>
            <span class="args">
              key
              cursor
              [MATCH pattern]
              [COUNT count]
            </span>
          </span>
          <span class="summary">Incrementally iterate hash fields and associated values</span>
        </li>
        <li data-group="sorted_set">
          <span class="command">
            <a href="http://redis.io/commands/zscan">ZSCAN</a>
            <span class="args">
              key
              cursor
              [MATCH pattern]
              [COUNT count]
            </span>
          </span>
          <span class="summary">Incrementally iterate sorted sets elements and associated scores</span>
        </li>
      </ul>
    </section>
    <footer>
      <p>
        This website is
        <a href="https://github.com/antirez/redis-io">open source software</a>
        developed by <a href="http://citrusbyte.com/">Citrusbyte</a>.
        <br> The Redis logo was designed by <a href="http://www.carlosprioglio.com/">Carlos Prioglio</a>. See more <a href="http://redis.io/topics/sponsors">credits</a>.
      </p>
      <div class="sponsor">
        Sponsored by
        <a href="http://www.gopivotal.com/products/redis">
          <img alt="Redis Support" height="25" src="./Command reference – Redis_html/9552275.png" title="Redis Sponsor" width="99">
        </a>
      </div>
    </footer>
  

</body></html>